﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="orglist.aspx.cs" Inherits="ZX.WebApp.Message.orglist" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
      <title>Excel导入SQL数据库</title>
      <link rel="stylesheet" type="text/css" href="../Scripts/yui_2.9.0/build/container/assets/skins/sam/container.css" />
      <style>
         .tabck
         {
              width:100%;
         }
        .tableContent
        {
            font-size:12px;
        }
        .tableContent th
        {
            border: solid 1px #D4DBE2;
            font-weight: bold;
            background-color: #F2F8FF;
            white-space: nowrap;
            line-height: 28px;
            text-align: left; padding-left:3px;
        }
        .tableContent td
        {
            border: solid 1px #D4DBE2;
            background-color: #F2F8FF;
            line-height: 28px;
            text-align: left;
            padding-left:3px;
        }
        .textbox
        {
            border-bottom: black 1px solid;
            border-top-style: none;
            border-right-style: none;
            border-left-style: none;
            background-color: white;
            overflow:hidden;
            height: 100%;
            width:98%; 
        }
         .style6
        {
           border-bottom: black 1px solid;
           border-top-style: none;
           border-right-style: none;
           border-left-style: none;
           background-color: white;
           overflow:hidden;
           height: 100%;
           width: 98%;
        }
        .labmessage
        {
            color:Red; 
        }
      </style>
      <script type="text/javascript">
          function RefreshData()//刷新父页数据
          {
              if (parent.NeedRefreshPage != null)
              {
                  if (typeof (parent.NeedRefreshPage.LoadData) == "function")
                  {
                      parent.NeedRefreshPage.RefreshData();
                  }
              }
          }

          function checknull() {
              var tab = document.getElementById("GridView1");
              var res="";
              for (var i = 1; i < tab.rows.length; i++) {
                  if (tab.rows[i].cells[4].innerHTML == "&nbsp;") {
                      res += "第" + i + "行，姓名分别为：" + tab.rows[i].cells[0].innerHTML + "、" + tab.rows[i].cells[1].innerHTML + "；";
                  }
              }
              if (res != "") {
                  alert(res+"电话号码为空，请检查原Excel表格相应位置是否存在换行情况。");
                  return false;
              }
              else
                  return true;
          }
      </script>
</head>
<body class="yui-skin-sam">
   <form id="form1" runat="server">
   <div>
        <table class="tableContent" style="width: 90%; border-collapse: separate; text-align: center">
            <tr>
               <td colspan="3">
                  为群组<asp:Label ID="orgname" runat="server"> [<% =otname %>] </asp:Label>导入EXCEL表成员：</td>
           </tr>
            <tr>
<td style=" width:30%;" >
  <asp:FileUpload ID="FileUpload1" runat="server" Width="305px" /></td>
    <td style=" width:20%;">
    <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="预览" /></td>
                <td ><a href="短信群组成员模板.xls" target="_blank">导入模板下载</a></td></tr>
<tr>
<td colspan="3">
<asp:GridView ID="GridView1" Width="90%" runat="server" >
</asp:GridView>
</td>
</tr>
<tr>
<td>
   </td> <%--OnClick="Button2_Click"--%>
<td><asp:Button ID="Button2" runat="server" Visible="false" OnClientClick="return checknull();" OnClick="Button2_Click" Text="导入数据库" />
</td>
<td style="width: 189px">

</td>
   </tr>
   <tr>
   <td colspan="3" align="left"><br />操作说明：<br />
   1、点【导入模板下载】下载数据模板，填写组员信息后保存；<br />
   2、点击【浏览...】选择要导入的EXCEL文件；<br />
   3、点击【预览】查看数据是否有误；<br />
   4、确保数据无误后，点击【导入数据库】进行数据导入，根据提示判断导入结果。<br />
   
   </td>
   </tr>
</table>
</div>
</form>
</body>

</html>

